####################################################-*- coding: utf-8 -*-#####
#
#
# Download daily trading raw data from sina and parse the result.
#
#
##############################################################################

class TradingDataParser(Thread):
    def __init__(self, dbobj):
        Thread.__init__(self)
        self.db = dbobj

    def run(self):
        while True:
            raw_data = self.retrieveData()
            self.db.enqueueData(datatype='raw_trading', raw_data)
            signal.set()

    def retrieveData(self):
        """Download data from sina, then parsing and form an well made string
           which will be sent to DB's inserting queue.
        """
        pass
